Extensively drug-resistant tuberculosis (XDR TB) has emerged as a significant global epidemic and poses a particular threat to HIV-infected persons. With few effective drugs available for treatment, XDR TB carries an extremely high mortality. Bedaquiline is the first new TB drug to receive FDA approval in 40 years and has shown considerable promise in early clinical trials of patients with MDR TB. The drug has not, however, been well-studied in patients with XDR TB or in those with HIV co-infection who are receiving antiretroviral therapy (ART). As a result, much remains unknown about the safety of this potentially transformative drug, the mechanisms of resistance, and the potential drug-drug interactions with common antiretroviral drugs. South Africa has among the highest burden of HIV and TB in the world, including a rapidly expanding epidemic of drug-resistant TB and HIV co-infection. In 2013, the National Department of Health created a treatment program to make bedaquiline available to patients with pre-XDR and XDR TB in combination with an optimized background regimen. The collision of XDR TB and HIV in South Africa offers a unique opportunity to study bedaquiline in patients who could benefit substantially from it, yet who have been largely excluded from the clinical trials. In Aim 1, we propose a prospective cohort study of pre-XDR and XDR TB participants to determine the effect of bedaquiline on the QT-interval when given with other QT-prolonging TB medications. We hypothesize that the co-administration of bedaquiline with clofazimine or fluoroquinolones will lead to additive increases in the QT interval and may lead to dangerous QT prolongation requiring discontinuation of one or more of these medications. In Aim 2, we will use whole genome sequencing to identify the genetic mechanisms of resistance to bedaquiline. Among participants who develop resistance, we will conduct whole genome sequencing of M. tuberculosis isolates to identify single nucleotide polymorphisms (SNPs). In Aim 3, we will examine drug-drug interactions of bedaquiline with ART. Bedaquiline is recommended to be given with either nevirapine or lopinavir/ritonavir-based regimens, based on small, single-dose studies in healthy volunteers. We will conduct intensive and sparse pharmacokinetic sampling on participants receiving bedaquiline, with or without ART. Each aim of this study will answer a fundamental question about bedaquiline that will directly inform its use in South Africa and globally. Our study will draw from the largest non-trial cohort of patients receiving bedaquiline anywhere in the world. The NIH and the Federal TB Task Force have identified specific priority research areas for the interaction between HIV and drug-resistant TB. This application will focus on two such areas for bedaquiline-new markers of resistance and pharmacologic interactions with ART-in South Africa, the epicenter of the convergent epidemics of drug-resistant TB and HIV.